Ext.define('TS.view.dilema.QuoteForm', {
    extend: 'TS.lib.Form',
    alias : 'widget.dilemapointquoteform',
    //title : 'Ocena',
	url:URL.dilema.form.dilemapointquote,
	items:[
		{xtype:'hidden',name:'dilema_point_quote_id'},
		
		{xtype:'combo',empty:'Testament',name:'testament_id',store:Dict.testament,b:1,childFld:'book_id',onSelect:Util.fldLoad},
		
		{xtype:'combo',empty:'Księga',name:'book_id',store:Ext.clone(Dict.book),childFld:'chapter_id',onSelect:Util.fldLoad},
		
		{xtype:'combo',name:'chapter_id',store:Ext.clone(Dict.chapter)},
		
		{xtype:'numberfield',name:'start_verse_number',minValue:1,maxValue:99},
		{xtype:'numberfield',name:'end_verse_number',minValue:1,maxValue:99},
		
		{xtype:'hidden',name:'dilema_point_id'}
		
	],
	buttons:[{
		text:'Zapisz',
		handler:Util.f.save,
		callback:function(){
			//Dict.bible.load();
			Util.store('DilemaPointQuote').load();
		}
	},{
		text:'Nowe',
		handler:Util.f.clear,
		callback:function(){
			Util.s.load('DilemaPointQuote');
			Util.fldVal('dilemapointquote->#dilema_point_id','dilema_point->id');
		}
	},{
		text:'Usuń',
		handler:Util.f.del,
		handlerConfig:{
			url:URL.dilema.del.dilemapointquote
		}
	}]
});